<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>精灵图使用</title>
</head>
<style>
    .box1 {
        width: 60px;
        height: 60px;
        background-color: skyblue;
        margin: 100px auto;
        background: url("images/sprites.png") no-repeat -182px 0;
        /*background-position: -182px 0;*/
    }

    .box2 {
        width: 27px;
        height: 25px;
        background-color: skyblue;
        margin: 200px;
        background: url("images/sprites.png") no-repeat -155px -106px;
    }
</style>
<body>
<div class="box1"></div>
<div class="box2"></div>
</body>
</html>